<?php

namespace app\admin\controller;
use app\base\controller\Base;
use think\Request;
use think\Cache;
use think\Config;
use think\Session;


class Plats extends Base
{
    public  $model;

    public function __construct()
    {

        parent::__construct();
    }

    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {//
        $options = [
            'type'   => 'redis',
            // 服务器地址
            'host'       => '47.93.19.32',
            //
            'port'       => '6379',
            //redis 密码
            'password' => 'redis.123@.',
            //
            'expire' => 1800,
            'select'     => '99',
            'prefix'     => '',
        ];
        $haander = new \think\cache\driver\Redis($options);
        if($haander->has("platforms")){
            $platformCache =  $haander->get("platforms");
          return   sucessJson("查询成功",$platformCache);
        }else{
            return failJson("查询失败",[]);
        }

    }






}
